SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO



CREATE PROCEDURE [dbo].[usp_SearchGwyNews]
    (
      @JOL_Gwy_NewsTitle VARCHAR(50),
      @JOL_EmployerName VARCHAR(50)
    )
AS 
    SELECT  b.JOL_Employer_Name,
            a.JOL_EmployerName,
            a.JOL_GWY_News_ID,
            a.JOL_GWY_NewsTitle,
            a.JOL_GWY_NewsClick
    FROM    JOL_GWY_News AS a
            INNER JOIN dbo.JOL_Employer AS b ON a.JOL_EmployerName = b.JOL_Employer_Account
    WHERE   ( a.JOL_GWY_NewsTitle LIKE '%' + @JOL_Gwy_NewsTitle + '%' )
            AND ( b.JOL_Employer_Name LIKE '%' + @JOL_EmployerName + '%' )
    ORDER BY a.JOL_GWY_AddTime DESC,
            a.JOL_GWY_UpdateTime DESC

GO
